﻿<div ng-init="currentTab='news'" ng-include="'Views/Menu/NewsCalendarEventMenu.html'" ></div>

<form name="newsAddForm" novalidate>
    <div class="title-bold" style="font-size: 16px; float: left; width: 60%; padding-right: 4%;">Add News Item</div>
    <div class="title-bold" style="float: left; width: 40%;">Body of Article</div>
    <div class="clear"></div>
    <div style="float: left; width: 60%; padding-right: 4%;">
        <select name="newsCategory" class="select-box" style="width: 96%;" ng-model="newsAdd.newsData.category">
            <option value="">News Category</option>
            <option ng-repeat="newsCategory in newsAdd.newsCategories" value="{{newsCategory.id}}">{{newsCategory.name}}</option>
        </select><br /><br />
        <div style="display: table; width: 99%;">
            <div class="table-row-inp">
                <div class="inp-label">
                    Article Title *
                </div>
                <div class="inp-holder">
                    <input name="newsTitle" type="text" class="inp" ng-model="newsAdd.newsData.title" required ng-maxlength="200">
                </div>
            </div>
            <div class="table-spacer">&nbsp;</div>
            <div class="table-row-inp">
                <div class="inp-label">
                    Date *
                </div>
                <div class="inp-holder">
                    <input name="newsDateCreated" type="text" class="inp" datepicker-popup="MM/dd/yyyy" ng-model="newsAdd.newsData.dateCreated" ng-required="true" />
                </div>
            </div>
            <div class="table-spacer">&nbsp;</div>
            <div class="table-row-inp">
                <div class="inp-label">
                    Tags
                </div>
                <div class="inp-holder">
                    <tags-input ng-model="newsAdd.newsData.tags" display-property="name" min-length="1" style="width: 90%;"></tags-input>
                </div>
            </div>
            <div class="table-spacer">&nbsp;</div>
            <div class="table-row-inp">
                <div class="inp-label">
                    Region *
                </div>
                <div class="inp-holder">
                    <select name="newsRegion" class="select-box" style="width: 95%;" ng-model="newsAdd.newsData.region" required>
                        <option value="">News Region</option>
                        <option ng-repeat="newsRegion in newsAdd.newsRegions" value="{{newsRegion.id}}">{{newsRegion.name}}</option>
                    </select>
                </div>
            </div>
            <div class="table-spacer">&nbsp;</div>
            <div class="table-row-inp">
                <div class="inp-label">
                    Unpublished Date *
                </div>
                <div class="inp-holder">
                    <input name="newsUnpublishedDate" type="text" class="inp" datepicker-popup="MM/dd/yyyy" ng-model="newsAdd.newsData.unpublishedDate" ng-required="true" />
                </div>
            </div>
            <div class="table-spacer">&nbsp;</div>
        </div><br/>
        <div class="title-bold">Available for:</div>
        <div style="display: table; width: 99%;">
            <div class="table-row-inp">
                <div class="inp-label">
                    Choose One
                </div>
                <div class="inp-holder">
                    <div style="float: left; padding-right: 10px;" ng-repeat="newsAvailability in newsAdd.newsAvailabilities">
                        <input type="radio" name="radiog_lite" id="radio{{$index}}" class="css-checkbox" checked="checked"
                               ng-value="newsAvailability.id" ng-model="newsAdd.newsData.availableFor" />
                        <label for="radio{{$index}}" class="css-label radGroup1">{{newsAvailability.name}}</label>
                    </div>
                    <div class="clear">&nbsp;</div>
                </div>
            </div>
        </div><br/><br/>
        <button class="btn-green" style="width: 151px; margin-right: 10px;" ng-click="newsAdd.publish();">Publish</button>
        <button class="btn-green" style="margin-right: 10px;" ng-click="newsAdd.saveAndContinue();">Save as Draft</button>
        <button class="btn-green" style="width: 151px;" ng-click="newsAdd.cancel();">Cancel</button>
    </div>
    <div style="float: left; width: 40%;">
        <div id="newsBody" name="newsBody" required class="editor-field" text-angular ng-model="newsAdd.newsData.body" required
             ta-toolbar="[['h1','h2','h3'],['bold','italics','underline'],['insertLink'],['html']]"></div>
    </div>
    <div class="clear">&nbsp;</div>
</form>